// Upgrade NOTE: commented out 'float4x4 _Object2World', a built-in variable
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'


Shader  "Custom/HeightRender" {

	Properties
	 {
 _MainTex ("Texture 1", 2D) = "white" {}
 _LightColour0 ("Light colour 0", Color) = (1,0.73,0.117,0)
 _Tim ("time", Float) = 0
}

	

	SubShader
     {
  Tags { "LIGHTMODE"="ForwardBase" "RenderType"="Opaque" }

    LOD 100
	Pass
	{
	
	

	CGPROGRAM
	#pragma vertex vert
	#pragma fragment frag
	#include "UnityCG.cginc"
    //#define Fixed3(value)  fixed3(value, value,value)

	struct VertexInput {
    fixed4 vertex : POSITION;
	fixed2 xlv_TEXCOORD0 : TEXCOORD0;
    //fixed2 xlv_TEXCOORD1 : TEXCOORD1;
    //fixed3 xlv_TEXCOORD2 : TEXCOORD2;
    //fixed3 xlv_TEXCOORD3 : TEXCOORD3;
    //fixed4 tangent : TANGENT;
    fixed3 normal : NORMAL;
    //fixed4 xlv_COLOR : COLOR;
	//VertexInput
	};


	struct VertexOutput {
	fixed4 pos : SV_POSITION;
    UNITY_FOG_COORDS(1)
    //fixed4 xlv_COLOR : COLOR;
	fixed2 xlv_TEXCOORD0 : TEXCOORD0;
    fixed2 xlv_TEXCOORD1 : TEXCOORD1;
    fixed3 xlv_TEXCOORD2 : TEXCOORD2;
    //fixed3 xlv_TEXCOORD3 : TEXCOORD3;
    //fixed3 xlv_TEXCOORD4 : TEXCOORD4;
	//VertexOutput
	};

 
 // float4x4 _Object2World;
 float4 _MainTex_ST;



	VertexOutput vert (VertexInput v)
	{
	VertexOutput o;
	//o.pos = UnityObjectToClipPos (v.vertex);
	o.xlv_TEXCOORD0 = TRANSFORM_TEX(v.xlv_TEXCOORD0, _MainTex);
	
  o.pos = UnityObjectToClipPos( v.vertex);
  //o.xlv_TEXCOORD0 = ((v.xlv_TEXCOORD0 * _MainTex_ST.xy) + _MainTex_ST.zw);
  o.xlv_TEXCOORD1 = mul(unity_ObjectToWorld , v.vertex).xyz;
  o.xlv_TEXCOORD2 = fixed3(1.0, 1.0, 1.0);


    UNITY_TRANSFER_FOG(o,o.vertex);
   
	return o;
	}


	fixed4 frag(VertexOutput i) : SV_Target
    {
    //fixed4 tmpvar_2 = tex2D(_MainTex, i.uv);
	
  half4 main_color_1;
  float3 tmpvar_2;
  tmpvar_2 = fixed3(((i.xlv_TEXCOORD1.y + 10.0) / 24.0),((i.xlv_TEXCOORD1.y + 10.0) / 24.0),((i.xlv_TEXCOORD1.y + 10.0) / 24.0));
  main_color_1.xyz = tmpvar_2;
	UNITY_APPLY_FOG(i.fogCoord, tmpvar_2);
  main_color_1.w = 1.0;
  return main_color_1;

	}
	ENDCG
	}
  }
Fallback "Diffuse"
}

